package com.youdianstar.app.common.skin

import android.content.Context
import com.youdianstar.app.common.ConfigTheme
//import com.qmuiteam.qmui.skin.QMUISkinManager


/**
 * File: ThemeManager
 * Author: 82149 Create: 2021/11/30 19:14
 * Changes (from 2021/11/30)
 * --------------------------------------------------
 * description:
 * ---------------------------------------------------
 *
 */
class ThemeManager {
    companion object {
        val instance by lazy { ThemeManager() }
    }

    //配置 平台id/代理/租户id
    var localConfig: Int = ConfigTheme.DEFAULT


    fun initTheme(context: Context) {
//        val skinManager: QMUISkinManager = QMUISkinManager.defaultInstance(context)
//        skinManager.addSkin(ConfigTheme.DEFAULT, R.style.AppThemeBase)
//        val themeIndex = DataManager.instance.getLocalTheme()
//        localConfig = themeIndex
//        skinManager.changeSkin(themeIndex)
    }

    fun setLocalTheme(themeId: Int) {
        localConfig = themeId
//        QMUISkinManager.defaultInstance(AppUtil.getApplication()).changeSkin(themeId)
//        DataManager.instance.setLocalTheme(themeId)
    }

    fun getLocalTheme(): Int {
        localConfig = 1 //DataManager.instance.getLocalTheme()
        return 1 //QMUISkinManager.defaultInstance(AppUtil.getApplication()).currentSkin
    }

    /****************************获取资源***************************/



}